<?php

namespace app\controller;

use app\BaseController;
use app\common\model\Customer;
use app\common\model\Device;
use think\facade\View;

class Lease extends BaseController
{
    public function index()
    {
        $lease_header_bg_img = get_sys_config('lease_header_bg_img');
        View::assign('lease_header_bg_img', $lease_header_bg_img);
        //首页我的设备
        $device = Device::where(['status' => 1])->limit(9)->order('create_time', 'desc')->select()->toArray();
        View::assign('device', $device);
        //客户
        $com = Customer::where(['status' => 1])->order('create_time', 'desc')->select()->toArray();
        View::assign('customer', $com);

        return View::fetch();
    }
}
